package com.yycx.module.bus.provider.controller;

import com.yycx.common.mybatis.model.ResultBody;
import com.yycx.common.springmvc.base.BaseController;
import com.yycx.module.bus.client.entity.BusSupplierRate;
import com.yycx.module.bus.provider.service.BusSupplierRateService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.Map;


/**
 * 供货商配置控制器
 *
 * @author flyme
 * @date 2020-08-02
 */
@RestController
@RequestMapping("/bus/bsr/")
public class BusSupplierRateController extends BaseController<BusSupplierRateService, BusSupplierRate> {

    @ApiOperation(value = "供货商费率配置-分页列表", notes = "供货商配置分页列表")
    @GetMapping(value = "page")
    public ResultBody pageList(@RequestParam(required = false) Map params) {
        return bizService.pageList(params);
    }

    @ApiOperation(value = "供货商配置-列表", notes = "供货商配置列表")
    @GetMapping(value = "list")
    public ResultBody list(@RequestParam(required = false) Map params) {
        return bizService.listEntityMap(params);
    }

    @ApiOperation(value = "供货商配置-添加", notes = "添加供货商配置")
    @PostMapping(value = "save")
    public ResultBody save(@RequestParam(required = false) Map params) {
        return bizService.add(params);
    }

    @ApiOperation(value = "供货商配置-更新", notes = "更新供货商配置")
    @PostMapping(value = "update")
    public ResultBody update(@RequestParam(required = false) Map params) {
        return bizService.edit(params);
    }

    @ApiOperation(value = "供货商配置-删除", notes = "删除供货商配置")
    @PostMapping(value = "remove")
    public ResultBody remove(@RequestParam(required = false) Map params) {
        return bizService.delete(params);
    }


    @ApiOperation(value = "供货商配置-详情", notes = "供货商配置详情")
    @GetMapping(value = "get")
    public ResultBody get(@RequestParam(required = false) Map params) {
        return bizService.get(params);
    }

}
